﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace TheCup
{
    [Table("eventjoins")]
    public class EventJoin
    {
        [Key]
        [Column("no")]
        public int Id { get; set; }

        public DateTime DateJoined { get; set; }

        [Column("eventno")]
        public int EventId { get; set; }

        [ForeignKey("EventId")]
        public virtual Event Event { get; set; }

        [Obsolete]
        public Nullable<DateTime> StartingTime { get; set; }

        public int PlayerId { get; set; }
        [ForeignKey("PlayerId")]
        public virtual Player Player { get; set; }

        [Obsolete]
        [Column("Id")]
        public Guid uuid { get; set; }

        [Obsolete]
        [Column("eventid")]
        public Guid LegacyEventId { get; set; }

        [Obsolete]
        [Column("userid")]
        public Guid LegacyPlayerId { get; set; }
    }

}